//
//  DRHomeCell.m
//  DoctorRen
//
//  Created by Lemon on 2018/11/19.
//

#import "DRHomeCell.h"
#import "DRHomeModel.h"

@interface DRHomeCell()

@property (weak, nonatomic) IBOutlet UIImageView *coverIV;
@property (weak, nonatomic) IBOutlet UILabel *titleLB;
@property (weak, nonatomic) IBOutlet UILabel *contentLB;

@property (weak, nonatomic) IBOutlet UILabel *tagLabel;

@end

@implementation DRHomeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.coverIV.contentMode = UIViewContentModeScaleAspectFill;
    self.coverIV.clipsToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setItem:(DRHomeItem *)item{
    [self.coverIV setImageWithURLString:item.pic_id];
    self.titleLB.text = item.title;
    self.contentLB.text = item._description;
    self.tagLabel.text = item.cid;
}

@end
